1. Field of the Invention
This invention relates generally to computer software and database systems. More particularly, the invention relates to object-oriented databases and computer languages.
2. Description of the Related Art
Database systems are serving increasingly important roles in today""s society. Modem database systems enable users to gather, manipulate, and maintain massive amounts of information. A mere handful of examples of the myriad uses of database systems includes computerized library systems, automated teller machines, flight reservation systems, computerized parts inventory systems, and configuration databases for computer systems and networks.
Nevertheless, database systems are often difficult to maintain. Relational databases, for example, though powerful, are often accessible only through complicated, formal queries in languages such as SQL (Structured Query Language). It is expensive to hire or train experts with proficiency in such a highly technical field. Storage is also a problem, as data files in a database can become large and unwieldy, consuming finite storage resources. It is therefore an important consideration that a database system be easy to administer, and that the data be easy to enter, retrieve, edit, and store.
Some database systems are implemented using object-oriented techniques. Object-oriented databases, like the object-oriented programming model, are based on objects: units that combine or encapsulate both data and related methods for operating on that data. Often, objects are related to one another in a class hierarchy which allows related objects to inherit attributes from one another. Object-oriented databases thus provide more accurate modeling of xe2x80x9creal-worldxe2x80x9d entities. However, object-oriented databases are often just as difficult to implement, employ, and maintain as other types of databases. Furthermore, the interdependencies and relationships among objects in an object-oriented database complicate the issue of storage and often result in large, bloated database files which store unnecessary information.
One specific type of database is a database employed by an operating system to maintain configuration information that relates to components of software and/or hardware of a computer system. For example, such a configuration database may store configuration information relating to application programs, hardware devices which are coupled to the computer system, and/or elements of the operating system. These configuration databases may be implemented in many different ways. To exploit the advantages of the object-oriented paradigm, configuration databases may be implemented as object-oriented databases. Unfortunately, these configuration databases, object-oriented or otherwise, are associated with the same difficulties as other types of database systems. For instance, if information in a configuration database is generated dynamically upon the start-up of a computer system, then that information will be lost from session to session unless it is stored in a convenient way.
Therefore, it is desirable to provide an intelligent mechanism and process for storing an object-oriented configuration database.
The problems outlined above are in large part solved by various embodiments of a method and system for customizing the transformation of an object-oriented database. In one embodiment, the transformation customizer is a plug-in which provides translation of primitive data types to and from complex data types for compilation and serialization processes.
In one embodiment, the object-oriented database can be stored in a persistent, grammatical form. A grammatical form is an expression of an object-oriented database in a textual form according to a grammar. The grammatical form is human-readable and human-editable. The grammatical form can be created by hand, or it can be created from an object-oriented database in transient form through the process of serialization. The grammar is designed to be platform-independent and programming-language-independent and therefore descriptive of any hierarchical object-oriented database. In one embodiment, the grammar comprises a set of keywords and a syntax.
In various embodiments, the invention provides a database transformation system and method wherein a persistent form which is described by a grammar is compiled into an intermediate form, wherein the intermediate form populates the active object-oriented database, and wherein the object-oriented database is serialized into a persistent, textual form described by the grammar.
For customizing serialization, in one embodiment, a complex data type is defined in terms of one or more primitive data types. One or more values in the object-oriented database are expressed in terms of the complex data type. During serialization, the plug-in module is invoked. The plug-in understands both the complex data type and the primitive data types. The values from the object-oriented database are translated from the complex data type to the primitive data types. The values are then expressed in terms of the primitive data types.
For customizing compilation, in one embodiment, a complex data type is defined in terms of one or more primitive data types. One or more values representing or corresponding to values in the object-oriented database are expressed in terms of the primitive data types. For example, these values may be expressed in a textual, grammatical form. During compilation of the textual form, the plug-in module is invoked. The plug-in understands both the complex data type and the primitive data types. The values from the object-oriented database are translated from the primitive data types to the complex data types. The values are then expressed in terms of the complex data type.
In one embodiment, the object-oriented database is an object-oriented configuration database which stores configuration parameters pertaining to the software and hardware of a computer system, such as application programs, device drivers, system services, and other components. In one embodiment, the object-oriented database is a platform-independent one, such as the Java(trademark) System Database, and is therefore configured to be hosted on several different operating systems and computing platforms. In one embodiment, database transformation according to the present invention is implemented as a package of classes and interfaces in the object-oriented Java(trademark) Language.